using System;
namespace time
{
    class maopao
    {
        public static void Main()
        {
            int[] array = { 1, 4, 3, 5, 2 };
            for (int i = 0; i < array.Length; i++)
            {
                for (int j = i; j < array.Length; j++)
                {
                    if (array[i] > array[j])
                    {
                        int temp = array[i];
                        array[i] = array[j];
                        array[j] = temp;
                    }

                }

            }
            foreach (var item in array)
            {
                Console.Write(item);
            }

            Console.Read();
        }
    }
}